﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace WpfAppDemo.command
{
    internal class NotifyPropertyChangedBase : INotifyPropertyChanged
    {
        /*
 
        本类作为事件的发布者，而 Window 作为事件的订阅者
 */
        public event PropertyChangedEventHandler? PropertyChanged;

        protected void onChange([CallerMemberName] string callerMemberName="") {

            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(callerMemberName));
        }
    }
}
